﻿using System;
using System.Collections.Generic;

namespace HangerSupport
{
	public class HSTypeInfo
	{
		public HSTypeInfo()
		{
			this.m_lstHSType = new List<HSDefineInfo>();
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kZJ_DC, "多层支架", "可以设置多层", "支架多层3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kZJ_SJ, "三角支架", "可以组合多种造型三角支架", "支架三角3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kZJ_XB, "悬臂支架", "单个悬臂梁支架", "支架悬臂3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kZJ_CB, "侧壁支架", "竖管支架", "支架竖管3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kZJ_PX, "偏心支架", "可以设置多层", "支架偏心3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kZJ_DZ, "多层直角支架", "可以设置多层", "支架直角多层3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_DC, "多层吊架", "可以设置多层", "吊架多层3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_PX, "偏心吊架", "可以设置多层", "吊架偏心3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_GJ, "钢筋吊架", "竖杆穿洞连接吊架", "吊架钢筋3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_DB, "单臂吊架", "单个竖杆吊架", "吊架单臂3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_DG, "单管吊架", "单个管道吊架", "吊架单管3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_SG, "三列钢筋吊架", "三列圆钢吊架", "吊架三筋3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_SL, "三列吊架", "三列吊架", "吊架三列3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_ZJ, "直角吊架", "直角吊架", "吊架直角3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_YC, "背焊延长吊架", "背焊延长吊架", "吊架延长3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_DC3, "多层三列吊架", "可以设置多层", "吊架多层三列3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_PX3, "偏心三列吊架", "可以设置多层", "吊架偏心三列3D.bmp"));
			this.m_lstHSType.Add(new HSDefineInfo(HSType.kDJ_DZ, "多层直角吊架", "可以设置多层", "吊架支架多层3D.bmp"));
			this.m_hsTypeDefault = this.GetItem("多层吊架");
		}

		public bool IsSupport(HSDefineInfo item)
		{
			return item.IsSupport();
		}

		public HSDefineInfo GetDefaultType()
		{
			return this.m_hsTypeDefault;
		}

		public HSDefineInfo GetItem(string strName)
		{
			foreach (HSDefineInfo hsdefineInfo in this.m_lstHSType)
			{
				bool flag = hsdefineInfo.m_strName == strName;
				if (flag)
				{
					return hsdefineInfo;
				}
			}
			return this.m_lstHSType[0];
		}

		public HSDefineInfo GetItem(HSType eType)
		{
			foreach (HSDefineInfo hsdefineInfo in this.m_lstHSType)
			{
				bool flag = hsdefineInfo.m_eType == eType;
				if (flag)
				{
					return hsdefineInfo;
				}
			}
			return this.m_lstHSType[0];
		}

		public void SetItem(HSDefineInfo item)
		{
			for (int i = 0; i < this.m_lstHSType.Count; i++)
			{
				bool flag = this.m_lstHSType[i].m_eType == item.m_eType;
				if (flag)
				{
					this.m_lstHSType[i] = item;
					break;
				}
			}
		}

		public List<HSDefineInfo> m_lstHSType;

		public HSDefineInfo m_hsTypeDefault;
	}
}
